program SRVR.PRMS;

uses
  FastMM4,
  SvcMgr,
  Forms,
  rtcService,
  Srvr_Main in 'Srvr_Main.pas' {SRVRPRMS: TService},
  Modl_HTTP in 'Modl_HTTP.pas' {ModlHHTP: TDataModule},
  Form_Main in 'Form_Main.pas' {FormMain},
  JsonAndDB in 'JsonAndDB.pas',
  Class_AppUtil in 'Class\Class_AppUtil.pas',
  Class_GZJG in 'Class\Class_GZJG.pas',
  Class_Staf in 'Class\Class_Staf.pas',
  Class_Dict in 'Class\Class_Dict.pas',
  Class_Wage_Fl in 'Class\Class_WAGE_FL.pas',
  Class_GZJG_FL in 'Class\Class_GZJG_FL.pas',
  Class_MOBL_GZJL in 'Class\Class_MOBL_GZJL.pas',
  Class_MOBL_FFJL in 'Class\Class_MOBL_FFJL.pas',
  Class_MOBL_STAF in 'Class\Class_MOBL_STAF.pas';

{$R *.RES}

begin
  if not IsDesktopMode(CONST_SRVR_NAME) then
  begin
    SvcMgr.Application.Initialize;
    SvcMgr.Application.CreateForm(TSRVRPRMS, SRVRPRMS);
    SvcMgr.Application.CreateForm(TModlHHTP, ModlHHTP);
    SvcMgr.Application.Run;
  end else
  begin
    Forms.Application.Initialize;
    Forms.Application.Title := 'SRVR.PRMS';
    Forms.Application.CreateForm(TModlHHTP, ModlHHTP);
    Forms.Application.CreateForm(TFormMain, FormMain);
    Forms.Application.Run;
  end;
end.
